package com.zhouyu.mybatis;

import com.zhouyu.mybatis.config.AppConfig;
import com.zhouyu.mybatis.service.UserService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author by gang.Li 2022/4/7 13:39
 */
public class MainStart {
	public static void main(String[] args) {
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
		context.register(AppConfig.class);
		context.refresh();

		UserService userService = context.getBean("userService", UserService.class);
		userService.test();

		context.close();
	}
}
